<template>
  <Header />
  <loading :isLoading="isLoading" :height="40" />
  <router-view class="router-view" />
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue'
import Header from '../components/header.vue'
import loading from '../components/loading.vue'
const isLoading = ref(false)

onMounted(() => {
  window.electron.ipcRenderer.on('change-loading', (_, data: boolean) => {
    isLoading.value = data
  })
})
</script>
<style lang="scss">
.router-view {
  width: 100%;
  height: calc(100vh - 40px);
  background-color: #f7f8fa;
  overflow-y: auto;
}
</style>
